<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBrowseRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('browse_records', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedBigInteger('ip')->default(0)->comment('ip');
            $table->string('country')->default('')->comment('国家');
            $table->string('region')->default('')->comment('省');
            $table->string('city')->default('')->comment('市');
            $table->string('isp')->default('')->comment('提供商');
            $table->timestamps();
            $table->comment = '浏览记录';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('browse_records');
    }
}
